import { createRouter, createWebHistory } from 'vue-router'
// import HomeView from '../views/HomeView.vue'
// import indexView from '../views/layout/indexView.vue'
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    // {
    //   path: '/login',
    //   component: () => import('@/views/login/LoginPage.vue')
    // }, //登录页
    {
      path: '/',
      redirect: '/home',
      component: () => import('@/views/layout/LayoutContainer.vue'),
      children: [
        {
          path: 'home',
          component: () => import('@/views/HomeView.vue')
        },
        {
          path: 'introduction',
          component: () => import('@/views/introduction/index.vue'),
        },
        { path: 'introduction/:id' , component: () => import('@/views/introduction/foods/index.vue') },
        // { path: '/introduction/001' , component: () => import('@/views/introduction/foods/food001.vue') },
        // { path: '/introduction/002' , component: () => import('@/views/introduction/foods/food002.vue') },
        // { path: '/introduction/003' , component: () => import('@/views/introduction/foods/food003.vue') },
        // { path: '/introduction/004' , component: () => import('@/views/introduction/foods/food004.vue') },
        // { path: '/introduction/005' , component: () => import('@/views/introduction/foods/food005.vue') },
        // { path: '/introduction/006' , component: () => import('@/views/introduction/foods/food006.vue') },
        {
          path: 'chat',
          name: 'chat',
          component: () => import('@/views/ChatView.vue')
        },
        {
          path: 'map',
          name: 'map',
          component: () => import('@/views/MapView.vue')
        }
      ]
    },
    { path: '/login', component: () => import('@/views/login/index.vue') }
  ]
})

export default router
